<template>
    <div>
        <chird @hook:beforeCreate="hookBeforeCreate" @hook:mounted="hookMounted" @hook:created="hookCreated" />

    </div>
</template>

<script>
    import chird from "./chird"
    export default {
        components: {
            chird
        },
        data() {
            return {
                time: null
            }
        },
        created() {
            this.time = setInterval(() => {
                console.log(90909)
            }, 1000)
            this.$once('hook:beforeDestroy', () => {
                clearInterval(this.time);
            })
        },
        methods: {
            hookBeforeCreate() {
                console.log("hookBeforeCreate")
            },
            hookCreated() {
                console.log("hookCreated")
            },
            hookMounted() {
                console.log('hookMounted')
            }
        }

    }
</script>

<style>

</style>